/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * com_distri_compras_fletes.java
 *
 * Created on 4/04/2014, 10:37:43 AM
 */

package sie_invdis;


import java.sql.*;
import javax.swing.*;

import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.JTable.*;
import java.awt.*;
import java.util.Date;
import java.util.Calendar;
import java.text.SimpleDateFormat;
import java.text.ParseException;
import java.text.*;
import javax.swing.table.DefaultTableCellRenderer;
/**
 *
 * @author michelle
 */
public class com_distri_compras_fletes extends javax.swing.JFrame {

     private javax.swing.table.DefaultTableModel jtable_modelo;


    private int control_enter=0,controlcombo=0,contagarbaje=0,errorf=0;
    private SimpleDateFormat formateador = new SimpleDateFormat("dd-MM-yyyy");
    private SimpleDateFormat formateadoresta = new SimpleDateFormat("yyyy-MM-dd");

    private double tpz=0,tcd=0,tpp=0;

    DefaultTableCellRenderer alinearCentro, alinearderecha, alinearIzquierda;
    //se crea intancia de la clase conexion
       bd_conexion x = new bd_conexion() ;
       //se creaa la variable resultset
       ResultSet rs = null;
    /** Creates new form com_distri_compras_fletes */
    public com_distri_compras_fletes() {
        this.iniciar_modelo_de_tabla();
        initComponents();
        java.util.Date fechahoya=new Date();
        this.jdc_fechadocto.setDate(fechahoya);

        this.jtf_fleteygastos1.setVisible(false);
        this.jtf_fleteygastospor.setVisible(false);
        this.jtf_importa.setVisible(false);

        this.jtf_idtienda.setText(String.valueOf(variables_global.getidtiendami()));
        this.jtf_idcliente.setText(variables_global.getcliente_tistribucion());


    }

    private void iniciar_modelo_de_tabla()
    {
        jtable_modelo=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo.addColumn("<html><b>Status</b></html>");
        jtable_modelo.addColumn("<html><b>Folio</b></html>");
        jtable_modelo.addColumn("<html><b>Doc. Ref.</b></html>");
        jtable_modelo.addColumn("<html><b>F.Alt. Sist</b></html>");
        jtable_modelo.addColumn("<html><b>F.doc prov.</b></html>");
        jtable_modelo.addColumn("<html><b>F.Recibi Merca.</b></html>");
        jtable_modelo.addColumn("<html><b>Viaje</b></html>");
        jtable_modelo.addColumn("<html><b>Proveedor</b></html>");
        jtable_modelo.addColumn("<html><b>Piezas</b></html>");
        jtable_modelo.addColumn("<html><b>Rem.Blister</b></html>");
   }

    public void centrar_datos()
    {
        alinearderecha = new DefaultTableCellRenderer();
        alinearderecha.setHorizontalAlignment(SwingConstants.RIGHT);

        jtb_comprascatalogo.getColumnModel().getColumn(9).setCellRenderer(alinearderecha);



    }
    private void carga_datos(int opbus,String tbusca)
    {
        String fechacat = "",fechallegatienda="",fechaentrega="",abrehtml="",cierrahtml="",texto="";
        DecimalFormat miformat = new DecimalFormat("############.#####");
       
        
        Object[] fnewRow = new Object[11];
        texto="select * from x1distribucion_terminados_compras_catalogov2("+opbus+",'"+tbusca+"','','','') as (idreg integer,iddocumento character varying(12),idstatus smallint,statusdescribe character varying(15),doctoanterior character varying(12),fechadocto date,fechadoctoenmes text,idproveedor character varying(12),describeproveedor character varying(60),observadocto character varying(80),usuario character varying(20),impuestoporcen numeric,descuentototal numeric,clasificacion smallint,describeclasificacion character varying(30),clasifechainicio date,clasifechafin date,clavepersonaldoc character varying(45),docsiguiente character varying(12),fechaentrega date,fechavenci date,impuestoporcen2 numeric,descuentofinan numeric,piezas numeric,subtotal numeric,totdes numeric,totimp numeric,total numeric,totalprecio numeric,flete numeric,idsubfam smallint,diasenalmacen integer,diasproveealmacen integer,rembli text,costobli numeric);";
       //invoco al metodo que trae el recordset de datos
       System.out.println(texto);
        try
         {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                   if(rs.getInt("idstatus") > 3)
                        {
                            abrehtml="";
                            cierrahtml="";
                        }
                   else
                        {
                            abrehtml="";
                            cierrahtml="";
                        }
                 fnewRow[0]=abrehtml+rs.getString ("idstatus")+":"+rs.getString ("statusdescribe")+cierrahtml;
                 fnewRow[1]=rs.getString ("iddocumento");
                 fnewRow[2]=abrehtml+rs.getString ("doctoanterior")+cierrahtml;
                 fnewRow[3]=abrehtml+this.fechaeuropea( rs.getString ("fechadocto"))+cierrahtml;
                 if(rs.getString("fechaentrega") != null)
                        {
                           fechallegatienda=abrehtml+ this.fechaeuropea(rs.getString("fechaentrega"))+cierrahtml;
                        }
                 fnewRow[4]=fechallegatienda;
                 if(rs.getString("fechavenci") != null )
                        {
                            fechaentrega=abrehtml+this.fechaeuropea(rs.getString ("fechavenci"))+cierrahtml;
                        }
                 fnewRow[5]=fechaentrega;
                 fnewRow[6]=abrehtml+rs.getString ("describeclasificacion")+cierrahtml;
                 fnewRow[7]=abrehtml+rs.getString ("describeproveedor")+cierrahtml;
                 fnewRow[8]=abrehtml+miformat.format(rs.getFloat("piezas"))+cierrahtml;
                 if(rs.getString ("rembli")!= null)
                 fnewRow[9]=abrehtml+rs.getString ("rembli")+"."+cierrahtml;
                 else
                 fnewRow[9]=abrehtml+"."+cierrahtml;
                 
                 if(rs.getFloat("flete")>0)
                    {
                     errorf=1;
                    }
                 else
                    {
                        jtable_modelo.addRow(fnewRow);
                        tpz+=rs.getFloat("piezas");
                        tcd+=rs.getDouble("subtotal");
                   }
                }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
     
        this.jtf_importa.setText(miformat.format(tcd));
        this.jtf_importa1.setText(miformat.format(tpz));

        this.centrar_datos();
         if (errorf==1)
            {
                JOptionPane.showMessageDialog(null,"<html><h2>Documento "+tbusca+" ya contiene flete, Reinicie Proceso de Asignacion de Flete</h2></html>", "Sistema Integral(Alta Compra) : Confirmacion",1);
            }

      }

    private String  fechaeuropea(String fecha) {

         //resibe cadena de fecha en formato americano yyyy-MM-dd
       java.util.Date fechaestaeuropa=null;
       SimpleDateFormat formateadorestaeuropa = new SimpleDateFormat("dd-MM-yyyy");
       String cadenafecha="";
        try
         {
          fechaestaeuropa = formateadoresta.parse(fecha);
         }
        catch (ParseException e)
          {
             //Error, la cadena de texto no se puede convertir en fecha.
          }
       cadenafecha= formateadorestaeuropa.format(fechaestaeuropa);
       return cadenafecha;

    }

    private String fechaamericana(Date fe) {
       SimpleDateFormat formateadorestaeuropa = new SimpleDateFormat("yyyy-MM-dd");
       String cadenafecha="";
       cadenafecha= formateadorestaeuropa.format(fe);
       return cadenafecha;
    }
 private String  fechaeuropea(Date fecha) {
       SimpleDateFormat formateadorestaeuropa = new SimpleDateFormat("dd-MM-yyyy");
       String cadenafecha="";
       cadenafecha= formateadorestaeuropa.format(fecha);
       return cadenafecha;
    }
      private void calcular_costoi()
 {
                DecimalFormat miformatim = new DecimalFormat("############.######");
                double costoa=Double.valueOf(this.jtf_fleteygastos.getText().toString());
                this.jtf_fleteygastos1.setText(miformatim.format(costoa));
                double cantidadi = 1+(costoa/Double.valueOf(this.jtf_importa.getText().toString())),costo=0;
               System.out.println("flete:"+cantidadi);
                if(cantidadi>0)
                this.jtf_fleteygastospor.setText(miformatim.format(cantidadi));
                else
                this.jtf_fleteygastospor.setText("0");


//                this.calcular_costoi();
 }

private void imprimir(int pag,float ptotal)
    {

     java.util.Date fechahoya=new Date();

     this.objimpresora=new com_distri_compras_imprimir();
    System.out.println("bloque:"+pag+" "+ptotal+" Evaluando impresion");
     this.objimpresora.setOneItem_cadenas_a_imprimir("            Id-Rep:flete                S.I.:Compra Articulos");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Fecha:"+this.+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("          Fecha Documento:"+this.fechaeuropea(this.jdc_fechadocto.getDate()));
     this.objimpresora.setOneItem_cadenas_a_imprimir("          Guia:"+this.jtf_guia.getText()+"     Cajas:"+this.jtf_cajas.getText()+"   Remisiones:"+this.jtf_remisiones.getText());
     this.objimpresora.setOneItem_cadenas_a_imprimir("          Importe de Flete:"+this.jtf_fleteygastos.getText()+" Factor Aplicado:"+this.jtf_fleteygastospor.getText());
     this.objimpresora.setOneItem_cadenas_a_imprimir("          Servcio:"+this.jtf_servicio.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("paginas:"+ pag + " de "+ptotal+"");
     System.out.println("bloque:"+pag+" "+ptotal+" Evaluando impresion");
     if((pag+1)>=ptotal)
        {
        this.objimpresora.setOneItem_cadenas_a_imprimir("          Total Piezas: "+this.jtf_importa1.getText());
        this.objimpresora.setOneItem_cadenas_a_imprimir("          ");
        this.objimpresora.setOneItem_cadenas_a_imprimir("..");
        }
     this.objimpresora.setOneItem_cadenas_a_imprimir("          Pagina: "+(pag+1)+" de"+ptotal);
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");

     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora.setObjeto_tabla(jtb_comprascatalogo);
     this.objimpresora.imprimir_all(1,pag);
    }


    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        jPanel1 = new javax.swing.JPanel();
        jtf_guia = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        jtf_cajas = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jtf_remisiones = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        jtf_fleteygastos = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        jtf_servicio = new javax.swing.JTextField();
        jScrollPane2 = new javax.swing.JScrollPane();
        jtb_comprascatalogo = new javax.swing.JTable(){
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;
            }
        };
        jbtn_eliminar = new javax.swing.JButton();
        jLabel8 = new javax.swing.JLabel();
        jtf_importa = new javax.swing.JTextField();
        jtf_fleteygastos1 = new javax.swing.JTextField();
        jtf_fleteygastospor = new javax.swing.JTextField();
        jButton1 = new javax.swing.JButton();
        jdc_fechadocto = new com.toedter.calendar.JDateChooser();
        jtf_importa1 = new javax.swing.JTextField();
        jLabel9 = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        jrbtn_compras = new javax.swing.JRadioButton();
        jrbtn_traspasos = new javax.swing.JRadioButton();
        jtf_busqueda = new javax.swing.JTextField();
        jbtn_busqueda = new javax.swing.JButton();
        jLabel6 = new javax.swing.JLabel();
        jScrollPane4 = new javax.swing.JScrollPane();
        jta_archivo = new javax.swing.JTextArea();
        jbtn_busqueda1 = new javax.swing.JButton();
        jtf_idtienda = new javax.swing.JTextField();
        jtf_idcliente = new javax.swing.JTextField();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jmni_salir = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        jmni_escape = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(sie_invdis.Sie_invdisApp.class).getContext().getResourceMap(com_distri_compras_fletes.class);
        setTitle(resourceMap.getString("Form.title")); // NOI18N
        setName("Form"); // NOI18N

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel1.border.title"))); // NOI18N
        jPanel1.setName("jPanel1"); // NOI18N

        jtf_guia.setText(resourceMap.getString("jtf_guia.text")); // NOI18N
        jtf_guia.setName("jtf_guia"); // NOI18N
        jtf_guia.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_guiaActionPerformed(evt);
            }
        });

        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        jtf_cajas.setText(resourceMap.getString("jtf_cajas.text")); // NOI18N
        jtf_cajas.setName("jtf_cajas"); // NOI18N
        jtf_cajas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_cajasActionPerformed(evt);
            }
        });

        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N

        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
        jLabel3.setName("jLabel3"); // NOI18N

        jtf_remisiones.setText(resourceMap.getString("jtf_remisiones.text")); // NOI18N
        jtf_remisiones.setToolTipText(resourceMap.getString("jtf_remisiones.toolTipText")); // NOI18N
        jtf_remisiones.setName("jtf_remisiones"); // NOI18N
        jtf_remisiones.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_remisionesActionPerformed(evt);
            }
        });

        jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
        jLabel4.setName("jLabel4"); // NOI18N

        jtf_fleteygastos.setText(resourceMap.getString("jtf_fleteygastos.text")); // NOI18N
        jtf_fleteygastos.setToolTipText(resourceMap.getString("jtf_fleteygastos.toolTipText")); // NOI18N
        jtf_fleteygastos.setName("jtf_fleteygastos"); // NOI18N
        jtf_fleteygastos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_fleteygastosActionPerformed(evt);
            }
        });

        jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
        jLabel5.setName("jLabel5"); // NOI18N

        jtf_servicio.setText(resourceMap.getString("jtf_servicio.text")); // NOI18N
        jtf_servicio.setToolTipText(resourceMap.getString("jtf_servicio.toolTipText")); // NOI18N
        jtf_servicio.setName("jtf_servicio"); // NOI18N

        jScrollPane2.setName("jScrollPane2"); // NOI18N

        jtb_comprascatalogo.setModel(this.jtable_modelo);
        jtb_comprascatalogo.setName("jtb_comprascatalogo"); // NOI18N
        jtb_comprascatalogo.setRowHeight(30);
        jtb_comprascatalogo.getTableHeader().setReorderingAllowed(false);
        jScrollPane2.setViewportView(jtb_comprascatalogo);

        jbtn_eliminar.setIcon(resourceMap.getIcon("jbtn_eliminar.icon")); // NOI18N
        jbtn_eliminar.setText(resourceMap.getString("jbtn_eliminar.text")); // NOI18N
        jbtn_eliminar.setName("jbtn_eliminar"); // NOI18N
        jbtn_eliminar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_eliminarActionPerformed(evt);
            }
        });

        jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N
        jLabel8.setName("jLabel8"); // NOI18N

        jtf_importa.setEditable(false);
        jtf_importa.setText(resourceMap.getString("jtf_importa.text")); // NOI18N
        jtf_importa.setToolTipText(resourceMap.getString("jtf_importa.toolTipText")); // NOI18N
        jtf_importa.setName("jtf_importa"); // NOI18N

        jtf_fleteygastos1.setEditable(false);
        jtf_fleteygastos1.setFont(resourceMap.getFont("jtf_fleteygastos1.font")); // NOI18N
        jtf_fleteygastos1.setText(resourceMap.getString("jtf_fleteygastos1.text")); // NOI18N
        jtf_fleteygastos1.setToolTipText(resourceMap.getString("jtf_fleteygastos1.toolTipText")); // NOI18N
        jtf_fleteygastos1.setName("jtf_fleteygastos1"); // NOI18N
        jtf_fleteygastos1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_fleteygastos1ActionPerformed(evt);
            }
        });

        jtf_fleteygastospor.setEditable(false);
        jtf_fleteygastospor.setFont(resourceMap.getFont("jtf_fleteygastospor.font")); // NOI18N
        jtf_fleteygastospor.setText(resourceMap.getString("jtf_fleteygastospor.text")); // NOI18N
        jtf_fleteygastospor.setToolTipText(resourceMap.getString("jtf_fleteygastospor.toolTipText")); // NOI18N
        jtf_fleteygastospor.setName("jtf_fleteygastospor"); // NOI18N
        jtf_fleteygastospor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_fleteygastosporActionPerformed(evt);
            }
        });

        jButton1.setIcon(resourceMap.getIcon("jButton1.icon")); // NOI18N
        jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N
        jButton1.setName("jButton1"); // NOI18N
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jdc_fechadocto.setDateFormatString(resourceMap.getString("jdc_fechadocto.dateFormatString")); // NOI18N
        jdc_fechadocto.setName("jdc_fechadocto"); // NOI18N

        jtf_importa1.setEditable(false);
        jtf_importa1.setText(resourceMap.getString("jtf_importa1.text")); // NOI18N
        jtf_importa1.setToolTipText(resourceMap.getString("jtf_importa1.toolTipText")); // NOI18N
        jtf_importa1.setName("jtf_importa1"); // NOI18N

        jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N
        jLabel9.setName("jLabel9"); // NOI18N

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jtf_guia, javax.swing.GroupLayout.PREFERRED_SIZE, 191, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jtf_cajas, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel3)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jtf_remisiones, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel4)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jtf_fleteygastos, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel5)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jtf_servicio, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jdc_fechadocto, javax.swing.GroupLayout.DEFAULT_SIZE, 117, Short.MAX_VALUE))
            .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 908, Short.MAX_VALUE)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(jbtn_eliminar)
                .addGap(30, 30, 30)
                .addComponent(jtf_fleteygastos1, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jtf_fleteygastospor, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jLabel8)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jtf_importa, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(49, 49, 49)
                .addComponent(jLabel9)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jtf_importa1, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(26, 26, 26)
                .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(19, 19, 19))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel1)
                        .addComponent(jtf_guia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel2)
                        .addComponent(jtf_cajas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel3)
                        .addComponent(jtf_remisiones, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel4)
                        .addComponent(jtf_fleteygastos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel5)
                        .addComponent(jtf_servicio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jdc_fechadocto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 240, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jbtn_eliminar)
                    .addComponent(jtf_fleteygastos1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jtf_fleteygastospor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton1)
                    .addComponent(jLabel8)
                    .addComponent(jtf_importa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jtf_importa1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel9))
                .addContainerGap(26, Short.MAX_VALUE))
        );

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel2.border.title"))); // NOI18N
        jPanel2.setName("jPanel2"); // NOI18N

        jrbtn_compras.setText(resourceMap.getString("jrbtn_compras.text")); // NOI18N
        jrbtn_compras.setName("jrbtn_compras"); // NOI18N

        jrbtn_traspasos.setText(resourceMap.getString("jrbtn_traspasos.text")); // NOI18N
        jrbtn_traspasos.setName("jrbtn_traspasos"); // NOI18N

        jtf_busqueda.setText(resourceMap.getString("jtf_busqueda.text")); // NOI18N
        jtf_busqueda.setName("jtf_busqueda"); // NOI18N
        jtf_busqueda.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_busquedaActionPerformed(evt);
            }
        });

        jbtn_busqueda.setIcon(resourceMap.getIcon("jbtn_busqueda.icon")); // NOI18N
        jbtn_busqueda.setText(resourceMap.getString("jbtn_busqueda.text")); // NOI18N
        jbtn_busqueda.setName("jbtn_busqueda"); // NOI18N
        jbtn_busqueda.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_busquedaActionPerformed(evt);
            }
        });

        jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
        jLabel6.setName("jLabel6"); // NOI18N

        jScrollPane4.setName("jScrollPane4"); // NOI18N

        jta_archivo.setColumns(20);
        jta_archivo.setRows(5);
        jta_archivo.setName("jta_archivo"); // NOI18N
        jScrollPane4.setViewportView(jta_archivo);

        jbtn_busqueda1.setIcon(resourceMap.getIcon("jbtn_busqueda1.icon")); // NOI18N
        jbtn_busqueda1.setText(resourceMap.getString("jbtn_busqueda1.text")); // NOI18N
        jbtn_busqueda1.setName("jbtn_busqueda1"); // NOI18N
        jbtn_busqueda1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_busqueda1ActionPerformed(evt);
            }
        });

        jtf_idtienda.setEditable(false);
        jtf_idtienda.setText(resourceMap.getString("jtf_idtienda.text")); // NOI18N
        jtf_idtienda.setToolTipText(resourceMap.getString("jtf_idtienda.toolTipText")); // NOI18N
        jtf_idtienda.setName("jtf_idtienda"); // NOI18N
        jtf_idtienda.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_idtiendaActionPerformed(evt);
            }
        });

        jtf_idcliente.setEditable(false);
        jtf_idcliente.setText(resourceMap.getString("jtf_idcliente.text")); // NOI18N
        jtf_idcliente.setToolTipText(resourceMap.getString("jtf_idcliente.toolTipText")); // NOI18N
        jtf_idcliente.setName("jtf_idcliente"); // NOI18N
        jtf_idcliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_idclienteActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jrbtn_compras)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jrbtn_traspasos)
                .addGap(78, 78, 78)
                .addComponent(jLabel6)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jtf_busqueda, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jbtn_busqueda)
                .addGap(35, 35, 35)
                .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jbtn_busqueda1)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jtf_idtienda, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jtf_idcliente, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(29, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGap(15, 15, 15)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jrbtn_compras)
                            .addComponent(jrbtn_traspasos)
                            .addComponent(jtf_busqueda, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jbtn_busqueda)
                            .addComponent(jLabel6)))
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 51, Short.MAX_VALUE)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jbtn_busqueda1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jtf_idtienda, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jtf_idcliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap())
        );

        jMenuBar1.setName("jMenuBar1"); // NOI18N

        jMenu1.setText(resourceMap.getString("jMenu1.text")); // NOI18N
        jMenu1.setName("jMenu1"); // NOI18N

        jmni_salir.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.ALT_MASK));
        jmni_salir.setIcon(resourceMap.getIcon("jmni_salir.icon")); // NOI18N
        jmni_salir.setText(resourceMap.getString("jmni_salir.text")); // NOI18N
        jmni_salir.setName("jmni_salir"); // NOI18N
        jmni_salir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmni_salirActionPerformed(evt);
            }
        });
        jMenu1.add(jmni_salir);

        jMenuBar1.add(jMenu1);

        jMenu2.setText(resourceMap.getString("jMenu2.text")); // NOI18N
        jMenu2.setName("jMenu2"); // NOI18N

        jMenuItem1.setText("jMenuItem1");
        jMenuItem1.setName("jMenuItem1"); // NOI18N
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });
        jMenu2.add(jMenuItem1);

        jmni_escape.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ESCAPE, 0));
        jmni_escape.setText(resourceMap.getString("jmni_escape.text")); // NOI18N
        jmni_escape.setName("jmni_escape"); // NOI18N
        jmni_escape.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmni_escapeActionPerformed(evt);
            }
        });
        jMenu2.add(jmni_escape);

        jMenuBar1.add(jMenu2);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jbtn_busquedaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_busquedaActionPerformed
        // TODO add your handling code here:
        if(JOptionPane.showConfirmDialog(null, "Estan correcto sus Datos?")==0) {
            this.carga_datos(2,this.jtf_busqueda.getText().toUpperCase());
        }
    }//GEN-LAST:event_jbtn_busquedaActionPerformed

    private void jbtn_busqueda1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_busqueda1ActionPerformed
        // TODO add your handling code here:
              if(JOptionPane.showConfirmDialog(null, "Desea Importar Datos?")==0) {
            String arreglo_importa[]=this.jta_archivo.getText().split("\n");
            String arreglo_codigo[]=null;
            System.out.println("Estos tiene archivo:"+arreglo_importa.length);
            for (int i=0;i<arreglo_importa.length;i++) {

                arreglo_codigo=arreglo_importa[i].split("\t");
                this.carga_datos(2, arreglo_codigo[0]);


            }
            this.jta_archivo.setText("");
        }
    }//GEN-LAST:event_jbtn_busqueda1ActionPerformed

    private void jbtn_eliminarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_eliminarActionPerformed
        // TODO add your handling code here:
         while(jtable_modelo.getRowCount()>0)jtable_modelo.removeRow(0);
          tpz=0;
          tcd=0;
          tpp=0;
          errorf=0;
}//GEN-LAST:event_jbtn_eliminarActionPerformed

    private void jtf_fleteygastos1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_fleteygastos1ActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jtf_fleteygastos1ActionPerformed

    private void jtf_fleteygastosporActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_fleteygastosporActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jtf_fleteygastosporActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:

 if ((errorf==0) && (Integer.valueOf(this.jtf_remisiones.getText())==this.jtable_modelo.getRowCount()) && (Float.valueOf(this.jtf_fleteygastos.getText().toString())>0))
            {
                this.calcular_costoi();
                if(JOptionPane.showConfirmDialog(null, "<html><h2>Cajas:"+this.jtf_cajas.getText()+"<br>guia :"+this.jtf_guia.getText()+"<br> Remisiones:"+this.jtf_remisiones.getText()+"<br>Flete:"+this.jtf_fleteygastos.getText()+"<br>sera Guardado. Estan correcto sus Datos?</h2></html>")==0)
                    {
                    //this.quitardescripcion();
                    java.util.Vector arreglodearticulos=this.jtable_modelo.getDataVector();
                    String articulos_papostgresql=arreglodearticulos.toString();
                    articulos_papostgresql=articulos_papostgresql.replace('[','{');
                    articulos_papostgresql=articulos_papostgresql.replace(']','}');
                    articulos_papostgresql=articulos_papostgresql.replace("null",".");
                    float filas=0,paginas=0;
                    int ni=0;
                    String texto="select * from x1distribucion_terminados_entra_doctos_insert_fletes(1,'"+this.fechaamericana(this.jdc_fechadocto.getDate())+"','"+this.fechaamericana(this.jdc_fechadocto.getDate())+"','"+this.fechaamericana(this.jdc_fechadocto.getDate())+"',"+this.jtf_importa.getText().trim()+",'"+this.jtf_guia.getText().toUpperCase()+"',"+this.jtf_cajas.getText().toUpperCase()+","+this.jtf_remisiones.getText().toUpperCase()+","+this.jtf_fleteygastos.getText().toUpperCase()+",'"+this.jtf_servicio.getText().toUpperCase()+"','"+variables_global.getLogin()+"',"+this.jtf_importa.getText()+",'"+this.jtf_idcliente.getText()+"','"+articulos_papostgresql+"',"+this.jtf_fleteygastospor.getText()+")";
                    System.out.println(texto);
                    try
                        {
                        rs=x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
                        while (rs.next())
                            {
                            if (rs.getInt(1) > 0)
                                    {
                                        JOptionPane.showMessageDialog(null,"Documento "+rs.getInt(1)+" Correcto, Gracias", "Sistema Integral(Alta Compra) : Confirmacion",1);
                                        //this.Limpiar_compra();
                                         filas = this.jtable_modelo.getRowCount() ;
                                         paginas = filas /50;
                                         for(ni=0;ni<paginas;ni++)
                                             {
                                                this.imprimir(ni, paginas);
                                                }
                                         while(jtable_modelo.getRowCount()>0)jtable_modelo.removeRow(0);
                                                tpz=0;
                                                tcd=0;
                                                tpp=0;
                                                errorf=0;
                                    }
                                else
                                    {
                                        JOptionPane.showMessageDialog(null," Error Verifique sus Cantidades", "Sistema Integral(Alta Compra) : Error",1);
                                    }
                            }
                        }
                    catch(Exception e) {
                        System.out.println(e.getMessage());
                        JOptionPane.showMessageDialog(null," Recepcion Incorrecta ", "Sistema Integral(Alta Compra) : Error",1);
                    }
                }//fin del if qu confirmo guardar diferencia
            }
else
                                    {
                                        JOptionPane.showMessageDialog(null," Error Verifique que su infomacion esta correcta?", "Sistema Integral(Alta Compra) : Error",1);
                                    }

    }//GEN-LAST:event_jButton1ActionPerformed

    private void jtf_fleteygastosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_fleteygastosActionPerformed
        // TODO add your handling code here:
         this.calcular_costoi();
         this.jtf_servicio.selectAll();
         this.jtf_servicio.requestFocus();
    }//GEN-LAST:event_jtf_fleteygastosActionPerformed

    private void jtf_remisionesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_remisionesActionPerformed
        // TODO add your handling code here:
        this.jtf_fleteygastos.requestFocus();
        this.jtf_fleteygastos.selectAll();
    }//GEN-LAST:event_jtf_remisionesActionPerformed

    private void jtf_cajasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_cajasActionPerformed
        // TODO add your handling code here:
        this.jtf_remisiones.requestFocus();
        this.jtf_remisiones.selectAll();
    }//GEN-LAST:event_jtf_cajasActionPerformed

    private void jtf_guiaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_guiaActionPerformed
        // TODO add your handling code here:
        this.jtf_cajas.requestFocus();
        this.jtf_cajas.selectAll();
    }//GEN-LAST:event_jtf_guiaActionPerformed

    private void jtf_idtiendaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_idtiendaActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jtf_idtiendaActionPerformed

    private void jtf_idclienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_idclienteActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jtf_idclienteActionPerformed

    private void jmni_salirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_salirActionPerformed
        // TODO add your handling code here:
        if(JOptionPane.showConfirmDialog(null, "Desea Salir?")==0)
        {

                        this.dispose();

        }
    }//GEN-LAST:event_jmni_salirActionPerformed

    private void jmni_escapeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_escapeActionPerformed
        // TODO add your handling code here:
        this.jmni_salirActionPerformed(evt);
    }//GEN-LAST:event_jmni_escapeActionPerformed

    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
        // TODO add your handling code here:
        this.imprimir(0, 1);
    }//GEN-LAST:event_jMenuItem1ActionPerformed

    private void jtf_busquedaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_busquedaActionPerformed
        // TODO add your handling code here:
        this.jbtn_busquedaActionPerformed(evt);
    }//GEN-LAST:event_jtf_busquedaActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new com_distri_compras_fletes().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JButton jButton1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JButton jbtn_busqueda;
    private javax.swing.JButton jbtn_busqueda1;
    private javax.swing.JButton jbtn_eliminar;
    private com.toedter.calendar.JDateChooser jdc_fechadocto;
    private javax.swing.JMenuItem jmni_escape;
    private javax.swing.JMenuItem jmni_salir;
    private javax.swing.JRadioButton jrbtn_compras;
    private javax.swing.JRadioButton jrbtn_traspasos;
    private javax.swing.JTextArea jta_archivo;
    private javax.swing.JTable jtb_comprascatalogo;
    private javax.swing.JTextField jtf_busqueda;
    private javax.swing.JTextField jtf_cajas;
    private javax.swing.JTextField jtf_fleteygastos;
    private javax.swing.JTextField jtf_fleteygastos1;
    private javax.swing.JTextField jtf_fleteygastospor;
    private javax.swing.JTextField jtf_guia;
    private javax.swing.JTextField jtf_idcliente;
    private javax.swing.JTextField jtf_idtienda;
    private javax.swing.JTextField jtf_importa;
    private javax.swing.JTextField jtf_importa1;
    private javax.swing.JTextField jtf_remisiones;
    private javax.swing.JTextField jtf_servicio;
    // End of variables declaration//GEN-END:variables
private com_distri_compras_imprimir objimpresora;
}
